import { createRouter, createWebHistory } from 'vue-router'
import SdyHome from '@/views/SdyHome/index.vue'
import SdyCart from '@/views/SdyCart/index.vue'
import SdySelf from '@/views/SdySelf/index.vue'
import SdyCate from '@/views/SdyCategory/index.vue'
import NotFound from '@/views/SdyNotFound/index.vue'
const router = createRouter({
  history: createWebHistory(import.meta.env.BASE_URL),
  routes: [
    {
      path:'/',
      redirect:'/home'
    },
    {
      path:'/home',
      name: 'home',
      component:SdyHome
    },
    {
      path:'/cart',
      name: 'cart',
      component:SdyCart
    },
    {
      path:'/self',
      name: 'self',
      component:SdySelf
    },
    {
      path:'/cate',
      name: 'cate',
      component:SdyCate
    },
    {
<<<<<<< HEAD
      path:'/search',
      name: 'search',
      component:()=> import ('@/views/SdySearch/index.vue'),
      meta:{
        hiddenFooter: true
      }
=======
      path: '/cart',
      name: 'cart',
      component: SdyCart,
      meta: { hidFooter: true }
>>>>>>> 24d0d7191411ba3bacecf3c116acfb924e67c6fb
    },
    {
      path:'/list',
      name: 'list',
      component:()=> import ('@/views/SdyGoodList/index.vue'),
    },
    {
<<<<<<< HEAD
      path:'/not-found',
=======
      path: '/detail',
      name: 'detail',
      component: () => import('@/views/SdyDetail/index.vue'),
      meta: { hidFooter: true }
    },
    {
      path: '/order',
      name: 'order',
      component: () => import('@/views/SdyOrder/index.vue'),
      meta: { hidFooter: true }
    },
    {
      path: '/login',
      name: 'login',
      component: () => import('@/views/SdyLogin/index.vue'),
      meta: { hidFooter: true }
    },
    {
      path: '/register',
      name: 'register',
      component: () => import('@/views/SdyRegister/index.vue'),
      meta: { hidFooter: true }
    },
    {
      path: '/list',
      name: 'list',
      component: () => import('@/views/SdyGoodsList/index.vue')
    },
    {
      path: '/search',
      name: 'search',
      component: () => import('@/views/SdySearch/index.vue'),
      meta: { hidFooter: true }
    },
    {
      // 找不到路由
      path: '/not-found',
>>>>>>> 24d0d7191411ba3bacecf3c116acfb924e67c6fb
      name: 'not-found',
      component:NotFound,
      meta:{
        hiddenFooter: true
      }
    },
    {
      path:'/:pathMatch(.*)*',
      redirect:'/not-found'
    },
  ]
})

export default router
